﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CreateAdmin.aspx.cs" Inherits="Sbook.AdminIstrator.CreateAdmin" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Src="~/AdminIstrator/ControlAdmin/MenuLeft.ascx" TagName="MenuLeft"
    TagPrefix="UC" %>
<%@ Register Src="ControlAdmin/ucLogout.ascx" TagName="ucLogout" TagPrefix="uc1" %>
<%@ Register Src="ControlAdmin/MenuTop.ascx" TagName="MenuTop" TagPrefix="uc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Admin System</title>
    <link rel="stylesheet" type="text/css" href="style.css" />
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/ddaccordion.js"></script>
    <script type="text/javascript">
        ddaccordion.init({
            headerclass: "submenuheader", //Shared CSS class name of headers group
            contentclass: "submenu", //Shared CSS class name of contents group
            revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
            mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
            collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
            defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
            onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
            animatedefault: false, //Should contents open by default be animated into view?
            persiststate: true, //persist state of opened contents within browser session?
            toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
            togglehtml: ["suffix", "<img src='images/plus.gif' class='statusicon' />", "<img src='images/minus.gif' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
            animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
            oninit: function (headers, expandedindices) { //custom code to run when headers have initalized
                //do nothing
            },
            onopenclose: function (header, index, state, isuseractivated) { //custom code to run whenever a header is opened or closed
                //do nothing
            }
        })
    </script>
    <script src="js/jquery.jclock-1.2.0.js.txt" type="text/javascript"></script>
    <script type="text/javascript" src="js/jconfirmaction.jquery.js"></script>
    <script type="text/javascript">

        $(document).ready(function () {
            $('.ask').jConfirmAction();
        });
	
    </script>
    <script type="text/javascript">
        $(function ($) {
            $('.jclock').jclock();
        });
    </script>
    <script language="javascript" type="text/javascript" src="js/niceforms.js"></script>
    <link rel="stylesheet" type="text/css" media="all" href="css/niceforms-default.css" />
    <link rel="stylesheet" type="text/css" href="css/tcal.css" />
    <script type="text/javascript" src="js/tcal.js"></script>
    <style>
        .tblCreate{ border:1px solid #CCFFFF}
        .tblCreate tr th{ border:1px solid #CCFFFF; text-align:right; width:170px;}
        .tblCreate tr th span{ color:Red};
        .tblCreate tr td{ border:1px solid #CCFFFF; text-align:left; padding:5px 20px 5px 5px;}
        .tblCreate tr td input{ width:250px}
        .tblCreate tr td label{ color:Red; display:none;}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="main_container">
        <div class="header">
            <div class="logo">
                <a href="Default.aspx">
                    <img alt="" src="../images/logo_sach.gif" width="130" height="100" />
                </a>
            </div>
            <div class="right_header">
                Welcome Admin |
                <uc1:ucLogout ID="ucLogout1" runat="server" />
            </div>
            <div class="jclock">
            </div>
        </div>
        <div class="main_content">
            <uc1:MenuTop runat="server" ID="menuTop" />
            <div class="center_content">
                <UC:MenuLeft runat="server" ID="MenuRight"></UC:MenuLeft>
                <div class="right_content">
                    <center>
                        <div>
                            <asp:Panel runat="server" ID="pnViewAdmin" Visible="true">
                                <asp:DataGrid runat="server" ID="grdAdmin" AutoGenerateColumns="false" Width="100%">
                                    <HeaderStyle BackColor="Aqua" />
                                    <Columns>
                                        <asp:BoundColumn DataField="Username" HeaderText="Username"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="Fullname" HeaderText="Fullname"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="Email" HeaderText="Email"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="Phone" HeaderText="Phone"></asp:BoundColumn>
                                    </Columns>
                                </asp:DataGrid>
                                <table>
                                    <tr>
                                        <th>
                                        </th>
                                        <td>
                                            <asp:Button runat="server" ID="btnAdd" Text="CreateUser" OnClick="Add_Click" Width="90px" />
                                           <%-- <asp:Button runat="server" ID="Button2" Text="Cancel" OnClick="Cancel_Click" Width="60px" />--%>
                                        </td>
                                </table>
                            </asp:Panel>
                            <asp:Panel runat="server" ID="pnUpdateAdmin" Visible="false">
                                <h1 style="color: Red;">
                                    Create User Admin</h1>
                                <table class="tblCreate">
                                    <tr>
                                        <th>
                                            Username <span>(*)</span>:
                                        </th>
                                        <td>
                                            <asp:TextBox runat="server" ID="txtUser"></asp:TextBox>
                                            <asp:Label runat="server" ID="lblUser" Text=""></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                            Fullname <span>(*)</span>:
                                        </th>
                                        <td>
                                            <asp:TextBox runat="server" ID="txtFullName"></asp:TextBox><asp:Label runat="server"
                                                ID="lblFullName" Text=""></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                            Sex:
                                        </th>
                                        <td>
                                            <asp:DropDownList runat="server" ID="ddlSex">
                                                <asp:ListItem Value="0">---Female---</asp:ListItem>
                                                <asp:ListItem Value="1">---Male---</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                            Password <span>(*)</span>:
                                        </th>
                                        <td>
                                            <asp:TextBox runat="server" ID="txtPass" TextMode="Password"></asp:TextBox><asp:Label runat="server"
                                                ID="lblPass" Text=""></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                            Confirm Password <span>(*)</span>:
                                        </th>
                                        <td>
                                            <asp:TextBox runat="server" ID="txtRePass" TextMode="Password"></asp:TextBox>
                                            <asp:Label runat="server" ID="lblRePass" Text=""></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                            Email:
                                        </th>
                                        <td>
                                            <asp:TextBox runat="server" ID="txtEmail"></asp:TextBox><asp:Label runat="server" ID="lblEmail" Text=""></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                            Phone:
                                        </th>
                                        <td>
                                            <asp:TextBox runat="server" ID="txtPhone"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <th>
                                        </th>
                                        <td>
                                            <asp:Button runat="server" ID="btnSave" Text="CreateUser" OnClick="Save_Click" Width="90px" />
                                            <asp:Button runat="server" ID="btnCancel" Text="Cancel" OnClick="Cancel_Click" Width="60px" />
                                        </td>
                                    </tr>
                                </table>
                            </asp:Panel>
                        </div>
                    </center>
                </div>
                <!-- end of right content-->
            </div>
            <!--end of center content -->
            <div class="clear">
            </div>
        </div>
        <!--end of main content-->
        <div class="footer">
            <div class="left_footer">
                SBook 2012</div>
        </div>
    </div>
    </form>
</body>
</html>
